package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;
import com.ym.medical.domain.entity.HealthCoinSourceSettingEntity;
import com.ym.common.annotations.CustomConstraint;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;

/**
 * 健康币获取渠道设置对象 health_coin_source_setting
 *
 * @author ym
 * @date 2020-09-16
 */
@ApiModel("健康币获取渠道设置-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HealthCoinSourceSettingUpdateParam extends BeanCovert<HealthCoinSourceSettingEntity>{

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("获取渠道：01签到02充值")
    @NotEmpty(message = "获取渠道：01签到02充值不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "获取渠道：01签到02充值长度超过{max}", groups = {Add.class, Update.class})
    private String sourceType;

    @ApiModelProperty("开始时间")
    @NotNull(message = "开始时间不能为空", groups = {Add.class, Update.class})
    private Date startTime;

    @ApiModelProperty("截止时间")
    private Date endTime;

    @ApiModelProperty("每次获取个数")
    private Integer eveyNum;

    @ApiModelProperty("健康币上限.0表示无上限")
    @NotNull(message = "健康币上限.0表示无上限不能为空", groups = {Add.class, Update.class})
    private Integer limitNum;

    @ApiModelProperty("上限周期单位")
    @Size(max = 2, message = "上限周期单位长度超过{max}", groups = {Add.class, Update.class})
    private String limitUnit;

    @ApiModelProperty("备注")
    @Size(max = 200, message = "备注长度超过{max}", groups = {Add.class, Update.class})
    private String remark;

    @ApiModelProperty("有效无效00无效01有效")
    @NotEmpty(message = "有效无效00无效01有效不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "有效无效00无效01有效长度超过{max}", groups = {Add.class, Update.class})
    private String valid;

    @ApiModelProperty("创建人")
    @NotNull(message = "创建人不能为空", groups = {Add.class, Update.class})
    private Long createSb;

    @ApiModelProperty("创建时间")
    @NotNull(message = "创建时间不能为空", groups = Add.class)
    private Date createTime;

}
